package com.ericpol.pageobject.copy;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class LoginPage extends Page {
	
	public LoginPage(WebDriver driver) {
		super(driver);
		open("http://demo.bananascrum.com/login");	
	}

	public MainPage logIn(String username, String pass) {
		insertText(By.id("login"), username);
		insertText(By.id("password"), pass);
		click(By.name("commit"));
		MainPage stronaGlowna = new MainPage(driver);
		return stronaGlowna;
	}
	public MainPage correctLogIn() {
		insertText(By.id("login"), "admin");
		insertText(By.id("password"), "password");
		click(By.name("commit"));
		MainPage stronaGlowna = new MainPage(driver);
		return stronaGlowna;
	}
}
